def recv():
    data = b'#110DC400-0001#206FCAW-S#308JSYJ-001#419GDGW-T01-ZET02-JS01'
    offset = 0
    out = dict()
    while offset < len(data):
        if data[offset] == ord('#'):
            offset += 1
            code = int(data[offset: offset+1])
            offset += 1
            length = int(data[offset: offset+2])
            offset += 2
            para = data[offset: offset+length]
            offset += length
            print (offset, len(data))
            out[code]= para
    return out
 
d = recv()
print(d)
